From 2e68319b6306dbc276311be21e8cc9fcdbf574ec Mon Sep 17 00:00:00 2001 From: zv Date: Thu, 8 Oct 2015 23:37:06 -0700 Subject: [PATCH] `_arguments` util. function for build scope specs Includes a shared and mutally exclusive build scope specifier for: * --bin * --example * --test * --lib * --bench --- src/etc/_cargo | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/etc/_cargo b/src/etc/_cargo index 197cdb422..b650fea50 100644 --- a/src/etc/_cargo +++ b/src/etc/_cargo @@ -341,6 +341,15 @@ _get_names_from_array() } +# Returns the shared argument style for build specifiers +_build_scope_spec() { + '(--bin --example --test --lib)--bench=[benchmark name]: :_benchmark_names' \ + '(--bench --bin --test --lib)--example=[example name]' \ + '(--bench --example --test --lib)--bin=[binary name]' \ + '(--bench --bin --example --test)--lib=[library name]' \ + '(--bench --bin --example --test)--test=[test name]' \ +} + #Gets the test names from the manifest file _test_names() { -- 2.30.2